package br.ufu.lsi.util;

import twitter4j.JSONObject;
import br.ufu.lsi.database.model.User;

import com.google.gson.Gson;

public class JSONUtil {
    
    public static User convertToUser( String userFile ) {

        User user = new Gson().fromJson( userFile, User.class );
        return user;
    }
    
    public static JSONObject convertToJSON( User user ) {
        
        JSONObject jo = (JSONObject) JSONObject.wrap( user );
        return jo;
    }

}
